IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
    ADD_DEFINITIONS(-DX64)
    SET(X64 TRUE)
ELSE()
    ADD_DEFINITIONS(-DX86)
    SET(X86 TRUE)
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)